* {
    /* 初始化 取消页面的内外边距 */
    padding: 0;
    margin: 0;
}

ol {
    width: 700px;
    margin: 0 auto;
    list-style: none;
    /* 初始化计数器 */
    counter-reset: list-counter;

    user-select: none;
    cursor: pointer;
}

ol li {
    border: 1px solid #d8d8d8;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 25px;
    letter-spacing: 1.2px;
    line-height: 40px;
    /* 增加计数器的值 */
    counter-increment: list-counter;
    /* 溢出隐藏 */
    overflow: hidden;
}

ol li input {
    /* 隐藏默认样式 */
    display: none;
}

ol li input:checked + p {
    /* 增加最大高度，允许内容显示 */
    max-height: 200px;
}
ol li::before {
    /* list-counter 表示计数器的当前值 */
    /* decimal-leading-zero 表示数字应始终以两位数格式显示，不足两为用零填充 */
    content: counter(list-counter, decimal-leading-zero);
    font-weight: bold;
    color: #34b2e0;
}

label {
    cursor: pointer;
    margin: 9px;
}

p {
    margin-left: 50px;
    max-height: 0;
    overflow: hidden;
    /* 添加过渡 */
    transition: all .5s ease;
}

p::before {
    content: '';
    display: block;
    width: 100%;
    margin-top: 18px;
}

p::after {
    content: '';
    display: block;
    width: 100%;
    margin-bottom: 25px;
}